/**
 * 
 */
package scriptrunner.execution;

/**
 * @author Administrator
 * 
 */
public class FuncSignature implements java.lang.Comparable<FuncSignature> {

	public FuncSignature(String name, int argCount) {
		this.name = name.substring(0);
		this.argCount = argCount;
	}

	public String GetName() {
		return name.substring(0);
	}

	public int GetArgumentCount() {
		return argCount;
	}

	private String name;
	private int argCount;

	@Override
	public int compareTo(FuncSignature o) {
		int r = name.compareTo(o.name);
		if (r != 0)
			return r;
		if (argCount < o.argCount)
			return -1;
		else if (argCount > o.argCount)
			return 1;
		else
			return 0;
	}
}
